// 引入ba-pic组件样式
import "./bg-pic.css";
import {getData} from 'api/getData';
import {URL} from '../../config';
const bg=document.getElementById('bg');
getData(URL).then((data)=>{
    bg.style.background=`url(${data.img}) no-repeat`;
    bg.style.backgroundSize='cover';
})